package com.banciyuan.bcywebview.base.factory;

import android.support.v4.app.Fragment;

import com.banciyuan.bcywebview.biz.main.daily.DailyFragment;
import com.banciyuan.bcywebview.biz.main.group.GroupFragment;
import com.banciyuan.bcywebview.biz.main.mainpage.MainPageFragment;
import com.banciyuan.bcywebview.biz.main.mineinfo.MineInfoFragment2;
import com.banciyuan.bcywebview.biz.main.newdiscover.DiscoverFragment;

/**
 * Created by hfxt2008 on 14-8-22.
 * 生成Fragment类的工厂类
 */
public class FragmentFactory {


    public static Fragment createFragment(int TAG) {
        Fragment fragment = null;
        switch (TAG) {
            case MainPageFragment.TAG:
            default:
                fragment = new MainPageFragment();
                break;
            case DiscoverFragment.TAG:
                fragment = new DiscoverFragment();
                break;
            case GroupFragment.TAG:
                fragment = new GroupFragment();
                break;
            case DailyFragment.TAG:
                fragment = new DailyFragment();
                break;
            case MineInfoFragment2.TAG:
                fragment = new MineInfoFragment2();
                break;
        }
        return fragment;
    }
}
